﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%
    var productInfo = ServiceLocator.GetInstance<Direct.Product.IProductService>();
    var license = productInfo.GetLicenseInformation();
    var appModel = ServiceLocator.GetInstance<Direct.ApplicationModel.IApplicationModelService>();
%>
<div class="ui-widget" style="width: 600px; min-height: 400px; line-height: 150%; padding: 10px;">
    <div style="font-weight: bold; float: left; background: transparent url(/core/theme/shell/logo_big.png) no-repeat left top; padding-left: 65px; min-height: 65px;">
        <%= productInfo.ProductName %>
        <br />
        <%= productInfo.ProductVersion %>
        <br/>
        (c) 2009 - <%= DateTime.Now.Year.ToString() %>
    </div>
    <div style="float: right">
        <span>
            Licenciado:<br />
        </span>
        <span style="font-weight: bold">
            <%= license.OwnerName %>
            <br />
            <%= license.CompanyName %>
            <br />
            <%= license.CompanyComercialName %>
        </span>
    </div>
    <div style="clear: both;" class="ui-widget">
        <span><b>Aplicativos instalados</b></span>
        <%
            var list = new UiList()
                .ConfigAsWidgetContent()
                .SetPadding(new Thickness(10))
                .SetItemTemplate(new UListItem().SetTextBinding("FullName"));
            list.ItemsSource = appModel.GetRegisteredApplications();
            Html.Render(list);
        %>
    </div>
    <div style="clear: both; margin-top: 10px;" class="ui-widget">
        <span>
            <b>Módulos instalados:</b></span>
        <%
            list = new UiList()
                .ConfigAsWidgetContent()
                .SetPadding(new Thickness(10))
                .SetItemTemplate(new UListItem().SetTextBinding("="));
            list.ItemsSource = productInfo.GetInstalledModules();
            Html.Render(list);
        %>
    </div>
    <br />
    <div>
        <b>Este produto utiliza partes ou todo o código dos seguintes softwares <i>open source</i>:</b>
        <div class="ui-widget-content" style="padding: 10px;">
            <b>Microsoft P&P Unity DI</b>
            <br />
            <a href="http://unity.codeplex.com/" target="_blank">http://unity.codeplex.com/</a><br />
            <br />

            <b>Microsoft P&P Composite WPF</b><br />
            <a href="http://compositewpf.codeplex.com/" target="_blank">http://compositewpf.codeplex.com/</a><br />
            <br />

            <b>Log4Net</b>
            <br />
            <a href="http://logging.apache.org/log4net/" target="_blank">http://logging.apache.org/log4net/</a><br />
            <br />

            <b>NHibernate</b>
            <br />
            <a href="http://www.nhforge.org" target="_blank">http://www.nhforge.org</a><br />
            <br />

            <b>jQuery</b><br />
            <a href="http://www.jquery.com" target="_blank">http://www.jquery.com</a><br />
            <br />

            <b>jQuery Ui</b>
            <br />
            <a href="http://www.jqueryui.com" target="_blank">http://www.jqueryui.com</a><br />
            <br />
        </div>
    </div>
</div>
